<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width" />
        <title>{% trans %}Login{% endtrans %}</title>
        <link href="{{ asset('bundles/objectsadmin/css/bootstrap.min.css') }}" type="text/css" rel="stylesheet" />
        <link href="{{ asset('bundles/objectsadmin/css/bootstrap-responsive.min.css') }}" type="text/css" rel="stylesheet" />
        <link rel="shortcut icon" href="{{ asset('favicon.ico') }}" />
        <style type="text/css">
            body {
              padding-top: 40px;
              padding-bottom: 40px;
              background-color: #f5f5f5;
            }

            .form-signin {
              max-width: 300px;
              padding: 19px 29px 29px;
              margin: 0 auto 20px;
              background-color: #fff;
              border: 1px solid #e5e5e5;
              -webkit-border-radius: 5px;
                 -moz-border-radius: 5px;
                      border-radius: 5px;
              -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
                 -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
                      box-shadow: 0 1px 2px rgba(0,0,0,.05);
            }
            .form-signin .form-signin-heading,
            .form-signin .checkbox {
              margin-bottom: 10px;
            }
            .form-signin input[type="text"],
            .form-signin input[type="password"] {
              font-size: 16px;
              height: auto;
              margin-bottom: 15px;
              padding: 7px 9px;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <form action="{{ path('login_check') }}" method="post" class="form-signin">
                {% for flashMessage in app.session.flashbag.get('notice') %}
                <div class="alert alert-info">
                    <p>{{ flashMessage | trans }}.</p>
                </div>
                {% endfor %}
                {% for flashMessage in app.session.flashbag.get('success') %}
                <div class="alert alert-success">
                    <p>{{ flashMessage | trans }}.</p>
                </div>
                {% endfor %}
                {% for flashMessage in app.session.flashbag.get('error') %}
                <div class="alert alert-error">
                    <p>{{ flashMessage | trans }}.</p>
                </div>
                {% endfor %}
                {% if error %}
                <div class="alert alert-error">
                    {{ error.message }}
                </div>
                {% endif %}
                <h2 class="form-signin-heading">{% trans %}Please sign in{% endtrans %}</h2>
                <input type="text" id="username" name="_username" value="{{ last_username }}" class="input-block-level" placeholder="{% trans %}User Name{% endtrans %}" />
                <input type="password" id="password" name="_password" class="input-block-level" placeholder="{% trans %}Password{% endtrans %}" />
                <label class="checkbox">
                    <input type="checkbox" id="remember_me" name="_remember_me" checked /> {% trans %}Remember me{% endtrans %}
                </label>
                <button class="btn btn-large btn-primary" type="submit">{% trans %}Sign in{% endtrans %}</button>
            </form>
            <div class="pull-right clearfix" style="margin-bottom: 10px;">
                <span class="label">
                    {% trans %}Developed by{% endtrans %} <a style="color: black" target="_blank" rel="noreferrer" href="http://objects.ws">Objects</a>
                </span>
            </div>
        </div>
    </body>
</html>
